﻿using System;
using System.Collections.Generic;
using System.Text;

namespace class3Homework
{
    class rectangle:geometry
    {
        private double length;
        private double width;
        public override double Area
        {
            get
            {
                return length * width;
            }
        }
        public double Length
        {
            get
            {
                return length;
            }
            set
            {
                length = value;
            }
        } 
        public double Width
        {
            get
            {
                return width;
            }
            set
            {
                width = value;
            }
        }
        public rectangle(double width,double length):base("rectangle")
        {
            this.width = width;
            this.length = length;
        }
        public override bool selfCheck()
        {
            if (width > 0 && length > 0 && Name.Equals("circle"))
            {
                return true;
            }
            else
            {
                return false;
            }
        }
    }
}
